package acm.pta4;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.PriorityQueue;

public class T9 {
    public static void main(String[] args) throws IOException {
        PriorityQueue<Integer> more=new PriorityQueue<>();
        BufferedReader in =new BufferedReader(new InputStreamReader(System.in));
        in.readLine();
        String[] read=in.readLine().split(" ");
        int count=read.length/2;
        int[] list=new int[count];
        for (int i = read.length - 1; i >= count; i--) {
            more.add(Integer.parseInt(read[i]));
        }
        for (int i = 0; i < count; i++) {
            int num = Integer.parseInt(read[i]);
            if (more.peek()<num){
                list[i]=more.poll();
                more.add(num);
            }else {
                list[i]=num;
            }
        }
        System.out.println("Outgoing #: "+more.size());
        System.out.println("Introverted #: "+list.length);
        Integer moreNum = more.stream().reduce((result, num) -> result += num).get();
        int smallNum = Arrays.stream(list).sum();
        System.out.println("Diff = "+(moreNum-smallNum));
    }
}
